//开发模式才会移除console
const provePlugin=[]
if(process.env.NODE_ENV==='production'){
  provePlugin.push('transform-remove-console')
}

module.exports = {
  "presets": [
    "@vue/cli-plugin-babel/preset"
  ],
  "plugins": [
    [
      "component",
      {
        "libraryName": "element-ui",
        "styleLibraryName": "theme-chalk"
      }
    ],
    ...provePlugin, //移除console插件
    "@babel/plugin-syntax-dynamic-import" //路由懒加载插件
  ]
}